package com.yjd.api.util;

import com.yjd.comm.tag.model.TagInfoDto;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by yjd-wap on 2017/7/5.
 */
public class TagUtils {

    /**
     * 获取某个对象所有标签
     * @param tagList
     * @param ref_id
     * @return
     * @throws Exception
     */
    public static List<String> getTagNameList(List<TagInfoDto> tagList, Long ref_id)throws Exception{
        List<String> tagNameList = new ArrayList<String>();
        for (TagInfoDto model :tagList){
            if(ref_id.intValue()==model.getRef_id().intValue()){
                tagNameList.add(model.getTag_name());
            }
        }
        return tagNameList;
    }
}
